#ifndef __CONTRACTS_H__
#define __CONTRACTS_H__

#include "IOptionsControl.h"
#include "ISysResources.h"

class CContrac: public virtual IContract, public virtual IProductInstance
{
INIT_CLASS_PRODUCT(CContrac)
public:
	const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	void ProcessUi(const char * pszValues);
	string GetPos(const char * pszType, string & strPos);
	void SetPos(const char * pszType, const char * pszValue);
	IStkItem * GetStkItem();
	void SetStkItem(IStkItem * ptrStkItem);
	const char * GetOptCode();
	void SetOptCode(const char * pszOptCode);
	const char * GetOptNum();
	void SetOptNum(const char * pszOptNum);
	const char * GetExerciseDate();
	void SetExerciseDate(const char * pszOptNum);
	const char * GetExercisePrice();
	void SetExercisePrice(const char * pszOptNum);
	const char * GetOptType();
	void SetOptType(const char * pszOptNum);
	int GetRecNo();
	void SetRecNo(int iRecNo); 
	void SetContractFormHwnd(::HWND ptrFormHwnd);
	IQuotationGui & QuotationGui();
	void DisposeEntrust(const char * pszMsgTxt);

private:
	ILock * m_ptrLock;
	shared_ptr<IQuotationGui> m_ptrQuotationGui;
	string m_strOptType, m_strOptCode, m_strOptNum, m_strExerciseDate, m_strExercisePrice;
	int m_iRecNo;

};




#endif // !__CONTRACTS_H__

